From: tsteven4 Date: Fri, 28 Dec 2018 17:14:33 +0000 (-0700) Subject: add include guard for src/core/optional.h (#290) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~8^2~54 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=b8eaf5968587c815f63cc21a1baf075f485cde20;p=gpsbabel.git add include guard for src/core/optional.h (#290) --- diff --git a/csv_util.cc b/csv_util.cc index 84fd98bfa..af959182d 100644 --- a/csv_util.cc +++ b/csv_util.cc @@ -32,6 +32,7 @@ #include "grtcirc.h" #include "jeeps/gpsmath.h" #include "src/core/logging.h" +#include "src/core/optional.h" #include "strptime.h" #include diff --git a/src/core/optional.h b/src/core/optional.h index 0357fb756..72f896b4b 100644 --- a/src/core/optional.h +++ b/src/core/optional.h @@ -23,6 +23,9 @@ // 1. 'gpsbabel_optional::optional' to 'std::optional', // 2. 'include "optional.h"' becomes 'include '. +#ifndef GPSBABEL_OPTIONAL_H_INCLUDED_ +#define GPSBABEL_OPTIONAL_H_INCLUDED_ + #if __cplusplus >= 201703L #warning "using std::optional" #include @@ -250,3 +253,4 @@ constexpr bool operator>=(const T& value, const optional& opt) } // namespace #endif +#endif // GPSBABEL_OPTIONAL_H_INCLUDED_